package Experiment;

import org.omg.Messaging.SYNC_WITH_TRANSPORT;

import java.util.Scanner;

/**
 * Created by user on 2017/6/6.
 */
public class MyBC {
    public static void main(String[] args) {
        Scanner scn =new Scanner(System.in);
        MyDC evaluator = new MyDC();

        System.out.println("输入中缀表达式（有空格）：");
      String expr =scn.nextLine();
       popLast pop = new popLast();
       pop.evaluate(expr);
        System.out.println("转换后的后缀表达式为：");
        System.out.println(pop.getMessage());

     int result = evaluator.evaluate (pop.getMessage());
        System.out.println("结果为"+ result);
    }

}
